package cn.signalpha.modules.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 实体类
 *
 * @author signalpha
 */
@Data
@TableName("shop_seller_role")
@ApiModel(value = "Role对象", description = "商户角色表")
public class SellerRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
  	private Long id;

    @ApiModelProperty(value = "所属商户id")
    private Long sellerId;

    @ApiModelProperty(value = "父主键")
    private Long parentId;

    @ApiModelProperty(value = "角色名")
    private String roleName;

    @ApiModelProperty(value = "排序")
    private Integer sort;

	@Pattern(regexp = "^[a-zA-Z0-9]+$", message = "角色别名只能使用英文和数字组合")
    @ApiModelProperty(value = "角色别名")
    private String roleAlias;

	@TableLogic
    @ApiModelProperty(value = "是否已删除")
	private Integer isDeleted;

}
